package com.csun.dsms.model.domain;

import com.csun.dsms.comment.core.mybatis.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import javax.persistence.*;

@Data
@Table(name = "dsms_schedule_log")
public class DsmsScheduleLog extends BaseEntity {

    /**
     * 调度器id
     */
    @Column(name = "schedule_id")
    private Long scheduleId;

    /**
     * 调度器名称
     */
    @Column(name = "schedule_name")
    private String scheduleName;

    /**
     * 调度器编码
     */
    @Column(name = "schedule_code")
    private String scheduleCode;

    /**
     * cron表达式
     */
    private String cron;

    /**
     * 操作耗时, 单位:毫秒
     */
    @Column(name = "operate_time")
    private Long operateTime;

    /**
     * 触发类型 0-系统触发 1-手动触发
     */
    @Column(name = "trigger_type")
    private Integer triggerType;

    /**
     * 备注
     */
    private String remark;

    /**
     * 开始时间
     */
    @Column(name = "start_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    /**
     * 结束时间
     */
    @Column(name = "end_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;
}